﻿ @*
 * ---------------------------------------------------
 * 作者: MTQ 
 * 日期： 2020/9/25 10:56:55 
 * ---------------------------------------------------
 *@
@using MTQ.BLL; 
@{     
   ViewBag.Title = "Index"; 
   Layout = "~/Views/Shared/_LayoutManager.cshtml";    
}    
<script  type="text/javascript">     
        
 $(function () {    
    
    //新建按钮事件   
    $("input[name='btnCreate']").click(function () {   
      $("#Base_RoleGroupCreate modal-title").html("Create");  
      $("#Base_RoleGroupCreate .modal-content").load("Base_RoleGroup/Create?time=" + new Date().getMilliseconds()); 
     $("#Base_RoleGroupCreate").modal("toggle");  
       
    });   
    //编辑   
    $("[name='table_Base_RoleGroup']").bootstrapTable({}).on('click-cell.bs.table', function (e, field, value, row, $element) {   
        if (field == "selectColumn") {   
            return;   
        }   
        var guid = row["BG_Id"];   
        var url = "/Base_RoleGroup/Edit?primarykey=" + guid + "&times=" + new Date().getMilliseconds();   
        $("#Base_RoleGroupCreate .modal-title").html("Edit");   
        $("#Base_RoleGroupCreate .modal-content").html("");   
        $("#Base_RoleGroupCreate .modal-content").load(url, function () {   
            $("#Base_RoleGroupCreate").modal("toggle");   
        });   
     });   
    
    $("input[name='btnDisable']").click(function () {   
        selectedRowChangeAvailable("BG_Id", "/Base_RoleGroup/ActivateSwich", $("table[name='table_Base_RoleGroup']"),"N");   
    });   
    
    $("input[name='btnEnable']").click(function () {   
        selectedRowChangeAvailable("BG_Id", "/Base_RoleGroup/ActivateSwich", $("table[name='table_Base_RoleGroup']"), "Y");   
    });   
    
 });   
</script>     
 <div class="container-fluid">
   
   <div class="portlet box blue">  
      <div class="portlet-title">  
        <div class="caption">  
           Base_RoleGroup数据列表  
        </div>  
      </div>  
      <div class="portlet-body">  
         <table  name="table_Base_RoleGroup"  data-toggle="table"       data-cache="False"         data-sort-order="asc"    
            data-sort-name="BG_Id"    
            data-url="/Base_RoleGroup/Search"    
            data-side-pagination="server"    
            data-pagination="true"    
            data-page-list="[5, 10, 20, 50, 100, 200]"   
            data-page-size="10"   
            data-page-number="1"   
            data-smart-display="true"  data-click-to-select="false"   
             >    
             
         <thead>    
            <tr>   
               <th data-field="action" data-checkbox="true" data-formatter="actionFormatter" data-events="actionEvents"></th>  
               <th data-field="BG_Id" data-align="center"  data-sortable="true" data-halign="center">BG_Id</th> 
               <th data-field="BG_Name" data-align="center"  data-sortable="true" data-halign="center">BG_Name</th> 
               <th data-field="BG_Remark" data-align="center"  data-sortable="true" data-halign="center">BG_Remark</th> 
               <th data-field="BG_Available" data-align="center"  data-sortable="true" data-halign="center">BG_Available</th> 
            </tr>  
         </thead>    
       </table>    
   </div>     
 </div>     

   <div  class="managebtnlist  row-fluid "  >  
     <input type="button" name="btnCreate" class="btn green-meadow" value="新建" />   
     <input type="button" name="btnDisable" class="btn green-meadow" value="停用" />  
     <input type="button" name="btnEnable" class="btn green-meadow" value="启用" />   
   </div>     
</div>        
 <!-- END PAGE -->       
<div id="Base_RoleGroupCreate" class="modal fade"  data-width="700"   data-backdrop="static" data-keyboard="false">        
    <div class="modal-content">        
        <div class="modal-header">        
             <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>       
            <h4 class="modal-title">Create</h4>        
         </div>       
        <div class="modal-body">        
         </div>       
      </div>      
    </div>        
        

